package com.wangce.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * ClassName: Order
 * Description:
 * date: 2021/11/29 9:49
 *
 * @author 凡人
 * @since JDK 1.8
 */
public class Order {
    private Integer id;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date addtime;
    private String brand;
    private String type;
    private String code;
    private Integer mainVersion;//主版本号
    private Double formVersion;//从版本号
    private String image;
    private Integer totalAmount;//总用量
    private Integer uid;
    private String auditor;
    private String content; //备注

    private User user;
    private List<Detail> details;

    public Order() {
    }

    public Order(Integer id, Date addtime, String brand, String type, String code, Integer mainVersion, Double formVersion, String image, Integer totalAmount, Integer uid, String auditor, String content, User user, List<Detail> details) {
        this.id = id;
        this.addtime = addtime;
        this.brand = brand;
        this.type = type;
        this.code = code;
        this.mainVersion = mainVersion;
        this.formVersion = formVersion;
        this.image = image;
        this.totalAmount = totalAmount;
        this.uid = uid;
        this.auditor = auditor;
        this.content = content;
        this.user = user;
        this.details = details;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", addtime=" + addtime +
                ", brand='" + brand + '\'' +
                ", type='" + type + '\'' +
                ", code='" + code + '\'' +
                ", mainVersion=" + mainVersion +
                ", formVersion=" + formVersion +
                ", image='" + image + '\'' +
                ", totalAmount=" + totalAmount +
                ", uid=" + uid +
                ", auditor='" + auditor + '\'' +
                ", content='" + content + '\'' +
                ", user=" + user +
                ", details=" + details +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getAddtime() {
        return addtime;
    }

    public void setAddtime(Date addtime) {
        this.addtime = addtime;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getMainVersion() {
        return mainVersion;
    }

    public void setMainVersion(Integer mainVersion) {
        this.mainVersion = mainVersion;
    }

    public Double getFormVersion() {
        return formVersion;
    }

    public void setFormVersion(Double formVersion) {
        this.formVersion = formVersion;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Integer getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(Integer totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getAuditor() {
        return auditor;
    }

    public void setAuditor(String auditor) {
        this.auditor = auditor;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<Detail> getDetails() {
        return details;
    }

    public void setDetails(List<Detail> details) {
        this.details = details;
    }
}
